import { enumProperties } from './common'

// transfer
export const transferProperties = [
    ...enumProperties.filter(e => ['enum'].indexOf(e.model) !== -1),
    {
        model: 'ui.filterable',
        widget: 'switch',
        label: '可搜索'
    },
    {
        model: 'ui.filterPlaceholder',
        widget: 'input',
        label: '搜索占位符',
        ui: {
            placeholder: '请输入搜索占位符',
            maxlength: 200
        },
        if(model) {
            return model && model.ui && model.ui.filterable
        }
    },
    {
        model: 'ui.targetOrder',
        widget: 'select',
        label: '右侧数据排序策略',
        enum: [
            { label: 'original', value: 'original' },
            { label: 'push', value: 'push' },
            { label: 'unshift', value: 'unshift' }
        ],
        ui: {
            placeholder: '请选择排序策略',
            maxlength: 200,
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.titles[0]',
        widget: 'input',
        label: '列表标题',
        ui: {
            placeholder: '请输入左侧列表标题',
            maxlength: 200,
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.titles[1]',
        widget: 'input',
        label: '',
        ui: {
            placeholder: '请输入右侧列表标题',
            maxlength: 200,
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.buttonTexts[0]',
        widget: 'input',
        label: '按钮文案',
        ui: {
            placeholder: '请输入左侧按钮文案',
            maxlength: 200,
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.buttonTexts[1]',
        widget: 'input',
        label: '',
        ui: {
            placeholder: '请输入右侧按钮文案',
            maxlength: 200,
            style: {
                width: '100%'
            }
        }
    }
]
